<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
	<meta charset="utf-8">
    <title>Loads Edit</title>
<?php echo link_tag(my_url().'skin.css'); ?>
<?php echo link_tag(my_url().'tcal.css'); ?>
<script type="text/javascript" src="<?php echo my_url(); ?>js/1.js"></script>
<script type="text/javascript" src="<?php echo my_url(); ?>tcal.js"></script> 
<script type="text/javascript" src="<?php echo my_url(); ?>scripts/jquery-1.2.6.js"></script>
<script src="<?php echo my_url(); ?>js/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript" src="<?php echo my_url(); ?>jquery.js"></script>

<script language="javascript" type="text/javascript">

 var BaseURL='<?php echo base_url(); ?>';

function redirect(location){
	window.location.href= location;
}
$(document).ready(function(){

 	$("#dv_company_name").change(function(){				

		var _url= BaseURL + "loads/p_getinfo?dv_company_name=" + this.value;

		$.post(_url,"",callbackdisplay);

	});

});

  	

function callbackdisplay(data,status){

		if(status=="success"){
			
			$("#f_name").val(data.f_name);
			$("#cell_phone_num").val(data.cell_phone_num);
			$("#type_of_truck").val(data.type_of_truck);		
			$("#mc_num").val(data.mc_num);		

		}

}

</script>

<script language="javascript" type="text/javascript">
 var BaseURL='<?php echo base_url(); ?>';



function redirect(location){
	
	window.location.href= location;
}

</script>

<link rel="stylesheet" href="../skin.css" type="text/css" media="screen" /><meta name="author" content="Jaypee Mahilum" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<link href="skin.css" rel="stylesheet" type="text/css" />
</head>

<?php
//echo $_SESSION['administrator_log']."============";
if(!isset($_SESSION['administrator_log']))
{
		echo"Log in first to access this page<html><title>WARNING</title><body><br><a href='".base_url()."administrator' />click here to log in.</a></body></html>";
}
else
{
?>
<body >

	<div class="BodyCover">
	
 		<div class="ParentContent">
	        <?php require("owner_menu.php"); ?>
			<div class="MenuTab">
    			<div class="MenuBelow"><img src="<?php echo my_url();?>images/below-menu.gif"></div>        
             </div>
			<div class="title">
            			   <h1>Edit Load </h1>
            </div>
			<div class="module-index1">
		  		<div align="right"><a href="<?php echo base_url()?>admin/logout" style="color:#FF0000;">logout</a></div><br/>
  	                <p class=""><?php if (isset($recordflag)) {echo $recordflag;}?><p>
                           
        
             <form action="<?php echo base_url()?>loads/p_edit_loads/" enctype='multipart/form-data'  accept-charset="utf-8" method="post">
           
                    <input type="hidden" name="hid_loadsid" value="<?php echo $info->loads_id ?>"  />
                    <label>Load_no:</label><input name="load_no" value="<?php echo $info->load_no ?>" /> 
                    <label>Date:</label><input name="date" class="tcal" value="<?php echo $info->date ?>" />
                    <label>Rep:</label><?php  echo select_list("em_profile","em_n_name","em_n_name","employee_code","","name=rep",$info->rep); ?><br />
                    <label>B/C Company Name:</label> <?php  echo select_list("bc_profile","bc_company_name","bc_company_name","profile_type='BC'","","name=bc_company_name",$info->bc_company_name); ?>  <br />
                    <label>Confirmation No.:</label> <input name="bc_confrm_no" value="<?php echo $info->bc_confrm_no ?>" />
                    <label>B/C Rate:</label> <input name="bc_rate" value="<?php echo $info->bc_rate?>"/> <br />                
                    <label>Pick up Place:</label> <input name="pick_up_place" value="<?php echo $info->pick_up_place ?>" />
                    <label>Pick up City:</label> <input name="pick_up_city" value="<?php echo $info->pick_up_city ?>" /><br />
                    <label>Pick up State:</label> <?php  echo select_list("state","state","state","state_id","","name=pick_up_state",$info->pick_up_state); ?> 
                    <label>Pick up Date:</label> <input name="pick_up_date" class="tcal" value="<?php echo $info->pick_up_date ?>"/><br />
                    <label>Drop off Place:</label> <input name="drop_off_place" value="<?php echo $info->drop_off_place ?>"/> 
                    <label>Drop off City:</label><input name="drop_off_city" value="<?php echo $info->drop_off_city ?>"/><br />
                    <label>Drop off State:</label> <?php  echo select_list("state","state","state","state_id","","name=drop_off_state",$info->drop_off_state); ?>  
                    <label>Drop off Date:</label><input name="drop_off_date" class="tcal" value="<?php echo $info->drop_off_date ?>" /><br />
                    <label>Driver:</label> <?php  echo select_list("dv_profile","dv_company_name","dv_company_name","profile_type='DV'","","name='dv_company_name' id='dv_company_name' ",$info->dv_company_name); ?> <br />
                    <label>D/V Rate:</label><input name="contract_amount" value="<?php echo $info->contract_amount ?>"/> <br />
                    <label>Driver Name:</label><input name="f_name" id="f_name" value="<?php echo $info->f_name ?>"/>                   
                    <label>Phone Number:</label><input name="cell_phone_num" id="cell_phone_num" value="<?php echo $info->cell_phone_num ?>"/>                   <br />
                    <label>MC No.:</label><input name="mc_num" id="mc_num" value="<?php echo $info->mc_num ?>"/>                   
                    <label>Type of Truck:</label><input name="type_of_truck" id="type_of_truck" value="<?php echo $info->type_of_truck?>"/> <br />                    <label>Comment Box:</label><textarea name="comment_box" ><?php echo $info->comment_box ?></textarea><br />
                    <input type="file" name="userfile"><br />
                    <input type="submit"  value="Save" name="cmdUpload">
                    <input type="button"  value="Cancel" onclick="redirect(BaseURL+'loads')" name="cmdcancel">
	        </form>

   	        
    		<br>

            <div class="BodyContent">
            </div>	
			    		
		</div><!---end of ParentContent ---->
        
		    <div class="Footer1">	
                <div class="Footer">Copyright &copy; 2011. All Rights Reserved <br><br>
                 <a href="http://webmartis.com"> <img src="http://localhost/wodocontacts/images/wmlink.png"></a>
                 
                </div>                
            </div> <!---end of Footer1 ---->        
    </div> <!---end of BodyCover ---->
</body>
<?php } ?>
</html>

